<?php global $concerto; $contentTypes = $concerto->DB->getResults("SELECT * FROM `cn_content_types`");
$currentType = $_REQUEST['type'];
$currentPage = $_REQUEST['display'];
	?>
		</div>
		<div id="sidebar">
			<ul id="admin-sidebar">
				<li><a href="../admin/"><span>Admin Home</span></a></li>
				<hr />
				<?php foreach($contentTypes as $type) : ?>
				<li id="sidebar-menu-<?=$type->ct_id?>" class="parent collapsed"><span><?=$type->ct_plural?></span>
					<ul>
						<li<?= ($type->ct_id==$currentType && $currentPage == 'configure') ? ' class="active"' : ''?>><a class="menu menu-configure" href="?display=configure&type=<?=$type->ct_id?>">Configure</a></li>
						<li<?= ($type->ct_id==$currentType && $currentPage == 'data') ? ' class="active"' : ''?>><a class="menu menu-data" href="?display=data&type=<?=$type->ct_id?>">Data</a></li>
						<li<?= ($type->ct_id==$currentType && $currentPage == 'manage') ? ' class="active"' : ''?>><a class="menu menu-manage" href="?display=manage&type=<?=$type->ct_id?>">Manage</a></li>
						<li<?= ($type->ct_id==$currentType && $currentPage == 'interactions') ? ' class="active"' : ''?>><a class="menu menu-interactions" href="?display=interactions&type=<?=$type->ct_id?>">User Interactions</a></li>
						<li<?= ($type->ct_id==$currentType && $currentPage == 'feedback') ? ' class="active"' : ''?>><a class="menu menu-ratings" href="?display=feedback&type=<?=$type->ct_id?>">Feedback</a></li>
						<li<?= ($type->ct_id==$currentType && $currentPage == 'tags') ? ' class="active"' : ''?>><a class="menu menu-tags" href="?display=tags&type=<?=$type->ct_id?>">Tags</a></li>
						<?php/**<li<?= ($type->ct_id==$currentType && $currentPage == 'config_tinymce') ? ' class="active"' : ''?>><a class="menu menu-editor" href="?display=config_tinymce&type=<?=$type->ct_id?>">Editor Settings</a></li>*/?>
						<li<?= ($type->ct_id==$currentType && $currentPage == 'rss') ? ' class="active"' : ''?>><a class="menu menu-rss" href="?display=rss&type=<?=$type->ct_id?>">RSS Settings</a></li>
						<li><a class="menu menu-add" target="add" href="<?=CN_URL?>?form=add_content&type=<?=$type->ct_id?>">Add <?=$type->ct_title?></a></li>
					</ul>
				</li>
				<?php endforeach;?>
				<hr />

				<li id="sidebar-menu-users" class="parent collapsed"><span>Users</span>
					<ul>
						<li<?= ($currentPage == 'view_users') ? ' class="active"' : ''?>><a class="menu menu-manage" href="?display=view_users">View Users</a></li>
						<li<?= ($currentPage == 'configure_users') ? ' class="active"' : ''?>><a class="menu menu-configure" href="?display=configure_users">Configure</a></li>
						<li<?= ($currentPage == 'users_data') ? ' class="active"' : ''?>><a class="menu menu-data" href="?display=users_data">Data</a></li>
						<li<?= ($currentPage == 'user_forms') ? ' class="active"' : ''?>><a class="menu menu-template" href="?display=user_forms">Forms</a></li>
						<li><a class="menu menu-add" target="add" href="<?=CN_URL?>?view=form&form=add_user">Add User</a></li>
					</ul>
				</li>
				<li id="sidebar-menu-appearance" class="parent collapsed"><span>Appearance</span>
					<ul>
						<li<?= ($currentPage == 'template') ? ' class="active"' : ''?>><a class="menu menu-template" href="?display=template">Template</a></li>
						<li<?= ($currentPage == 'nav_menus') ? ' class="active"' : ''?>><a class="menu menu-nav" href="?display=nav_menus">Navigation Menus</a></li>
					</ul>
				</li>
				<li><a href="?display=content_relations"><span>Content Relations</span></a></li>
				<li><a href="?display=system_settings"><span>System Settings</span></a></li>
				<li><a href="?display=boxes"><span>Boxes</span></a></li>
				
				<li><a href="?display=modules"><span>Modules</span></a></li>
				<?php /**<li><a href="?display=editor"><span>File Editor</span></a></li>
				<li><a href="<?=CN_URL?>user/edit-profile.php" target="_blank"><span>Your Account</span></a></li>
				<li><a href="?display=about_concerto"><span>About Concerto</span></a></li>*/?>
				<hr />
				<?php Modulator()->runFunction('admin_sidebar'); ?>
			</ul>
		</div>
		<div class="clearboth"></div>